**# Bookmark #1 Setting

*Windows
global root  = "G:/Dropbox/Environmental Injustice/Empirical"
global rawdata = "$root/rawdata"
global workdata = "$root/workdata"
global results = "$root/results"
global outfile = "$root/outfile"

cd "$workdata"

**# Bookmark #2.1 Regression
*Cardiovascular Disease
use "$outfile/Individual_heartandday.dta",clear

reghdfe heart lowedu5_post_notapwater lowedu5_post lowedu5_notapwater notapwater_post lowedu5 notapwater post ,absorb(i.id i.province#i.year) cluster(i.province i.year)

outreg2 using "$results/Table S22.xls",replace ctitle(Cardiovascular Disease) ///
keep(lowedu5_post_notapwater lowedu5_post) ///
addtext(Individual FE, YES, ProvincebyYear FE, YES) ///
bdec(3) tdec(3) rdec(3)


*Inactive Days
use "$outfile/Individual_heartandday.dta",clear

reghdfe day lowedu5_post_notapwater lowedu5_post lowedu5_notapwater notapwater_post lowedu5 notapwater post ,absorb(i.id i.province#i.year) cluster(i.province i.year)

outreg2 using "$results/Table S22.xls",append ctitle(Inactive Days) ///
keep(lowedu5_post_notapwater lowedu5_post) ///
addtext(Individual FE, YES, ProvincebyYear FE, YES) ///
bdec(3) tdec(3) rdec(3)

*Tumor
use "$outfile/Individual_tumor.dta",clear

reghdfe tumor lowedu5_post_notapwater lowedu5_post lowedu5_notapwater notapwater_post lowedu5 notapwater post ,absorb(i.id i.province#i.year) cluster(i.province i.year)

outreg2 using "$results/Table S22.xls",append ctitle(Tumor) ///
keep(lowedu5_post_notapwater lowedu5_post) ///
addtext(Individual FE, YES, ProvincebyYear FE, YES) ///
bdec(3) tdec(3) rdec(3)


*Daily Work Hours

use "$outfile/Individual_hour.dta",clear

reghdfe hour lowedu5_post_notapwater lowedu5_post lowedu5_notapwater notapwater_post lowedu5 notapwater post ,absorb(i.id i.province#i.year) cluster(i.province i.year)

outreg2 using "$results/Table S22.xls",append ctitle(Daily Work Hours) ///
keep(lowedu5_post_notapwater lowedu5_post) ///
addtext(Individual FE, YES, ProvincebyYear FE, YES) ///
bdec(3) tdec(3) rdec(3)


*Wage_100

use "$outfile/Individual_wage.dta",clear

reghdfe wage_100 lowedu5_post_notapwater lowedu5_post lowedu5_notapwater notapwater_post lowedu5 notapwater post ,absorb(i.id i.province#i.year) cluster(i.province i.year)

outreg2 using "$results/Table S22.xls",append ctitle(Wage_100) ///
keep(lowedu5_post_notapwater lowedu5_post) ///
addtext(Individual FE, YES, ProvincebyYear FE, YES) ///
bdec(3) tdec(3) rdec(3)



**# Bookmark #2.2 Multiple Hypothesis Testing
use "$outfile/Table S22.dta",clear

rwolf2 (reghdfe heart ddd1 dd1_1 dd1_2 dd1_3 d1_1 d1_2 d1_3,absorb(i.id1 i.province1#i.year1) cluster(i.province1 i.year1)) ///
	   (reghdfe day ddd1 dd1_1 dd1_2 dd1_3 d1_1 d1_2 d1_3,absorb(i.id1 i.province1#i.year1) cluster(i.province1 i.year1)) ///
	   (reghdfe tumor ddd2 dd2_1 dd2_2 dd2_3 d2_1 d2_2 d2_3,absorb(i.id2 i.province2#i.year2) cluster(i.province2 i.year2)) ///
	   (reghdfe hour ddd3 dd3_1 dd3_2 dd3_3 d3_1 d3_2 d3_3,absorb(i.id3 i.province3#i.year3) cluster(i.province3 i.year3)) ///
	   (reghdfe wage_100 ddd4 dd4_1 dd4_2 dd4_3 d4_1 d4_2 d4_3,absorb(i.id4 i.province4#i.year4) cluster(i.province4 i.year4)), ///
	   indepvars(ddd1,ddd1,ddd2,ddd3,ddd4) strata(province) cluster(province wave) ///
	   seed(654321) noplusone usevalid

